Skip to content

fix: prevent mass loss for supercritical fluids in liquid remover - #1715

Open
olelod wants to merge 1 commit into
mainfrom
fix/liquid-remover-supercritical-guard
Open

fix: prevent mass loss for supercritical fluids in liquid remover#1715
olelod wants to merge 1 commit into
mainfrom
fix/liquid-remover-supercritical-guard

Conversation

@olelod

@olelod olelod commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

NeqSim's flash mislabels supercritical CO₂ as liquid (vapor_fraction=0). The LiquidRemover then discards 100% of mass.

This happens e.g. in CO₂ injection compressor trains when intercooled stage pressures exceed a temperature-dependent threshold (e.g. ~74 bar at 31°C, ~290 bar at 35°C, ~560 bar at 80°C).

Fix: When vapor_fraction ≤ 0.0001, compute the EoS critical point (criticalPointFlash, cached per composition). If the stream is above it — supercritical, pass through unchanged. If below — genuinely liquid, raise NoGasPhaseError to avoid infinite anti-surge recirculation.

Closes equinor/ecalc-internal#2107

Discussion: equinor/ecalc-internal#2102

@olelod
olelod requested a review from a team as a code owner August 12, 2026 18:05
@olelod
olelod force-pushed the fix/liquid-remover-supercritical-guard branch from f53ecfa to b4d7289 Compare August 12, 2026 18:08
@olelod
olelod force-pushed the fix/liquid-remover-supercritical-guard branch from b4d7289 to 667945a Compare August 12, 2026 18:09

@jsolaas jsolaas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to issue/discussion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants